(function () {
  'use strict';

  angular
    .module('client')
    .factory('infoService', infoService);

  infoService.$inject = ['indexService' ,'INFO_LIST'];
  function infoService(indexService, INFO_LIST) {
    var service = {
      getInfo: getInfo,
      initList: initList,
    };

    return service;

    function getInfo() {
      return indexService.getDeviceInfo();
    }

    function initList(list) {
      var container = '<ul class="list-group info-list">';
      var items = '';
        for(var key in list) {
          items = items + '<li class="list-group-item">' +INFO_LIST[key] + list[key]+ '</li>';
        }
      container += items;
      container += '</ul>';
      return container;
    }

  }
}());
